﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucSelection.ascx.cs" Inherits="controls_ucSelection" %>
<asp:HiddenField runat="server" ID="hdnIsCos" />
<asp:HiddenField runat="server" ID="hdnIsForModify" />
<asp:Label runat="server" ID="lblsel"></asp:Label>
<table width="240px" style="height: 20px;" cellspacing="0" cellpadding="0" border="0">
    <tr style="height: 15px;" valign="top">
        <td style="background-image: url(images/alb_01.png); background-repeat: no-repeat;
            border-style: none; margin-top: 0; margin-bottom: 0; margin-right: 0; margin-left: 0;">
        </td>
        <td style="background-image: url(images/alb_sus.png); background-repeat: repeat-x;
            border-style: none; margin-top: 0; margin-bottom: 0; margin-right: 0; margin-left: 0;">
        </td>
        <td style="background-image: url(images/alb_03.png); background-repeat: no-repeat;
            border-style: none; margin-top: 0; margin-bottom: 0; margin-right: 0; margin-left: 0;">
        </td>
    </tr>
    <tr style="height: 15px;">
        <td style="background-image: url(images/alb_stanga.png); background-position: left;
            background-repeat: repeat-y; border-style: none; margin-left: 0; margin-top: 0;
            margin-bottom: 0; margin-right: 0; width: 15px;">
        </td>
        <td style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;
            background-image: url(images/alb_pixelutz.png); background-repeat: repeat;" align="center">
            <table style="height: 15px;">
                <tr align="center">
                    <td style="width: 200px;" align="left">
                        <%-- <table>
                                                        <tr align="left">
                                                            <td align="center" colspan="2" style="width: 20px;">
                                                                <asp:ImageButton runat="server" ID="ImageButton1" ImageUrl="~/images/Search-icon.png"
                                                                    Width="20px" Height="20px" OnClick="btnSearch_Click" />
                                                            </td>
                                                            <td align="center" style="width: 210px;">
                                                                <asp:Label runat="server" ID="lblEmitent" Text="Emitent" CssClass="label" Font-Bold="true"
                                                                    Font-Size="x-Small"></asp:Label>
                                                                <asp:TextBox runat="server" ID="txtEmitent" Width="150px" ForeColor="Black" Font-Names="Verdana"
                                                                    Font-Size="x-Small"></asp:TextBox>
                                                            </td>
                                                            <td align="center" style="width: 260px;">
                                                                <asp:Label runat="server" ID="Label1" Text="Valoare document" CssClass="label" Font-Bold="true"></asp:Label>
                                                                <asp:TextBox runat="server" ID="txtValMin" Width="50px" ForeColor="Black" Font-Names="Verdana"
                                                                    Font-Size="X-Small"></asp:TextBox>
                                                                <b>-</b>
                                                                <asp:TextBox runat="server" ID="txtValMax" Width="50px" ForeColor="Black" Font-Names="Verdana"
                                                                    Font-Size="X-Small"></asp:TextBox>
                                                            </td>
                                                            <td align="center" style="width: 260px;">
                                                                <asp:Label runat="server" ID="Label2" Text="Data scadentei sub " CssClass="label"
                                                                    Font-Bold="true"></asp:Label>
                                                                <asp:TextBox runat="server" ID="txtData" Width="100px" ForeColor="Black" Font-Names="Verdana"
                                                                    Font-Size="X-Small"></asp:TextBox>
                                                                <ajaxToolkit:CalendarExtender runat="server" ID="calExt" TargetControlID="txtData">
                                                                </ajaxToolkit:CalendarExtender>
                                                            </td>
                                                            <td align="center" colspan="2" style="width: 20px;">
                                                                <asp:ImageButton runat="server" ID="btnSearch" ImageUrl="~/images/Search-icon.png"
                                                                    Width="20px" Height="20px" OnClick="btnSearch_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>--%>
                        <table>
                            <tr>
                                <td colspan="2">
                                    <asp:Repeater runat="server" ID="rptSelection" Visible="true">
                                        <HeaderTemplate>
                                            <table>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr>
                                                <td>
                                                    <asp:Label runat="server" ID="lblDescriptionProduct" Text="Produs:" CssClass="label"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblProductName" Text='<%#DisplayProductName((int)Eval("ProductId")) %>'
                                                        CssClass="labelTitle" Font-Bold="true" Font-Size="Small"></asp:Label>
                                                </td>
                                            </tr>    
                                            <tr>
                                                <td align="right">
                                                    <asp:LinkButton runat="server" ID="lnkButtonM" Text="Modifica" CssClass="labelTitle"
                                                        Visible='<%#IsForModify%>' OnClick="lnkButtonM_Click" CommandArgument='<%#String.Format("{0}/{1}/{2}",Eval("ProductId"),Eval("ProductPrice"),Eval("ProductQuantity")) %>'></asp:LinkButton>
                                                </td>
                                                <td align="right">
                                                    <asp:LinkButton runat="server" ID="lnkBtnRemove" Text="Sterge" CssClass="labelTitle"
                                                        Visible='<%#IsForModify%>' OnClick="lnkBtnRemove_Click" CommandArgument='<%#String.Format("{0}/{1}/{2}",Eval("ProductId"),Eval("ProductPrice"),Eval("ProductQuantity")) %>'></asp:LinkButton>
                                                </td>
                                            </tr>
                                            <tr>
                                                <%-- <td>
                        <asp:Label runat="server" ID="lblDescriptionMaterial" Text='Material' CssClass="label"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="lblDescriptionCuloare" Text='Culoare' CssClass="label"></asp:Label>
                    </td>--%>
                                                <td align="right">
                                                    <asp:Label runat="server" ID="lblDescriptionPrice" Text='Pret' CssClass="label"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:Label runat="server" ID="lblDescriptionQuantity" Text='Cant' CssClass="label"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <%--<td>
                        <asp:Label runat="server" ID="lblMaterialName" Text='<%#DisplayMaterialName((int)Eval("MaterialId")) %>' CssClass="label" Font-Bold="true"></asp:Label>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="lblColourName" Text='<%#DisplayColourName((int)Eval("MaterialColourId")) %>' CssClass="label" Font-Bold="true"></asp:Label>
                    </td>--%>
                                                <td align="right">
                                                    <asp:Label runat="server" ID="lblProductPrice" Text='<%#Eval("ProductPrice") %>'
                                                        CssClass="label" Font-Bold="true"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:Label runat="server" ID="lblProductQuantity" Text='<%#Eval("ProductQuantity") %>'
                                                        CssClass="label" Font-Bold="true"></asp:Label>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <SeparatorTemplate>
                                            <tr>
                                                <td colspan="4">
                                                    <asp:Image runat="server" ID="imgSeparator" ImageUrl="~/images/lineLogin_very_small.JPG" />
                                                </td>
                                            </tr>
                                        </SeparatorTemplate>
                                        <FooterTemplate>
                                            </table>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label runat="server" ID="lblTotal" Text="Total" CssClass="label" Visible="false"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:Label runat="server" ID="lblTotalVal" CssClass="label" Font-Bold="true" Visible="false"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:LinkButton runat="server" ID="lnkButton" Text="Modifica/Finalizeaza Comanda"
                                        CssClass="labelTitle" Font-Bold="true" OnClick="lnkButton_Click" Visible="false"></asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
        <td style="background-image: url(images/alb_dreapta.png); background-position: left;
            background-repeat: repeat-y; border-style: none; margin-left: 0; margin-top: 0;
            width: 15px;">
        </td>
    </tr>
    <tr style="height: 15px;">
        <td style="background-image: url(images/alb_07.png); background-repeat: no-repeat;
            border-style: none; margin-top: 0; margin-bottom: 0; margin-right: 0; margin-left: 0;">
        </td>
        <td style="background-image: url(images/alb_jos.png); background-position: left;
            background-repeat: repeat-x; border-style: none; margin-top: 0; margin-bottom: 0;
            margin-right: 0; margin-left: 0;">
        </td>
        <td style="background-image: url(images/alb_09.png); background-repeat: no-repeat;
            border-style: none; margin-top: 0; margin-bottom: 0; margin-right: 0; margin-left: 0;">
        </td>
    </tr>
</table>
